<?php

class Admin_Model_Contact

{
	public function save( array $data )
	{
		$_table =  new Application_Model_DbTable_Contacts( );
		if(isset($data[ 'id' ]) && $data[ 'id' ]){
			$id = (int)$data[ 'id' ];
			unset($data[ 'id' ]);
			$_table->update($data, ' id = '.$id);
		}else{
			unset($data[ 'id' ]);
			$_table->insert($data);
		}
	}

}


		
	